#define _CRT_SECURE_NO_WARNINGS 1
#include<stdio.h>
int Apex(int n)
{
	int a = n/100;
	int b = n/10 - a * 10;
	int c = n - a * 100 - b * 10;
	if (n == a * a * a + b * b * b + c * c * c)
	{
		return 1;
	}
}
int main()
{
	int i = 0;
	for (i = 100; i < 1000; i++)
	{
		if (Apex(i) == 1)
		{
			printf("%d ", i);
		}
	}
	return 0;
}